package com.groupseven.happycampus.service.impl;

import com.groupseven.happycampus.common.pojo.LittleUser;
import com.groupseven.happycampus.common.pojo.User;
import com.groupseven.happycampus.mapper.LoginMapper;
import com.groupseven.happycampus.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @BeLongsProject: happycampus
 * @BeLongsPackage: com.groupseven.happycampus.service.impl
 * @Author: WRH
 * @CreateTime: 2022-07-27 14:58
 * @Description: TODO
 * @Version: 1.0
 */
@Service("loginService")
public class LoginServiceImpl implements LoginService {
    @Autowired
    private LoginMapper loginMapper;

    @Override
    public User login(Map<String, Object> params) {
        User user = loginMapper.login((String) params.get("username"),(String) params.get("password"));

        return user;
    }

    @Override
    public LittleUser littlelogin(Map<String, Object> params) {
        LittleUser littleUser = loginMapper.littlelogin((String)params.get("username"),(String) params.get("password"));

        return littleUser;
    }
}

